/**
 * @file framebuffer.h
 * @author ThomasKingFree
 * @version 0.1
 * @date 2021-03-16
 *
 * @copyright Copyright (c) 2021
 *
 */

#ifndef YUE_GUI_FRAMEBUFFER_H
#define YUE_GUI_FRAMEBUFFER_H

#include "utils/color.h"

namespace YueGUI {
class FrameBuffer {
public:
    FrameBuffer();
    ~FrameBuffer();

    void SetFramebuffer(void *framebuffer);
    void *GetFramebuffer() const;

    void SetFrambufferFormat(ColorFormat format);
    ColorFormat GetFramebufferFormat() const;

    void SetFramebufferWidth(int16_t width);
    int16_t GetFramebufferWidth() const;

    virtual void *Transform(int16_t x, int16_t y) = 0;

private:
    void *framebuffer_ = nullptr;
    ColorFormat format_ = ARGB8888;
    int16_t width_ = 0;
};
} // namespace YueGUI
#endif // YUE_GUI_FRAMEBUFFER_H